package com.java.io.serializable;

import java.io.Serializable;

/**
 * 作用:用于序列化的实体对象
 */
public class Computer implements Serializable{

	private static final long serialVersionUID = 1L;

	private int id;
	private String cpuModel;
	private double price;

	public Computer(int id, String cpuModel, double price) {
		this.id = id;
		this.cpuModel = cpuModel;
		this.price = price;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCpuModel() {
		return cpuModel;
	}

	public void setCpuModel(String cpuModel) {
		this.cpuModel = cpuModel;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	@Override
	public String toString() {
		return "Computer{" +
				"id=" + id +
				", cpuModel='" + cpuModel + '\'' +
				", price=" + price +
				'}';
	}
}
